<?php

/**
*
* @author  :  Dennis T Kaplan
*             URL: http://linux.PzzAzz.net
*        
* @version :  1.0
* Date     :  June 17, 2007
* Function :  printa
* Purpose  :  Print Array 
*
* @access	public
* @param	array
* @return	array name and output of array in pre as print_r
*/	

function printa(&$a){
    $caller_info = array_shift(debug_backtrace());
    $lines = file($caller_info['file']);
    $line = $lines[$caller_info['line'] - 1];
    if(preg_match('/printa\\s*\\(\$(\\w+)/', $line, $matches)) {
            $name_of_my_array = $matches[1];
    }
    echo "<hr><h3>". $name_of_my_array . "<pre>";
    print_r($a);
    echo "</pre></h3><hr>";
}
?>